<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019/4/27
 * Time: 21:40
 */

use Workerman\Worker;
require_once '../vendor/workerman/workerman/Autoloader.php';

$udp_worker = new Worker('udp://127.0.0.1:9090');
$udp_worker->onMessage = function($connection, $data){
    var_dump($data);
    $connection->send('ok');
};
Worker::runAll();